//
//  SendLocationManager.h
//  YueYueSpecailCarDriver
//
//  Created by 李亚军 on 2017/6/26.
//  Copyright © 2017年 黄旺鑫. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HeaderMacro.h"
@class SendLocationManager;
@protocol SendLocationManagerDelegate <NSObject>

@optional
/// 刷新司机考勤信息
- (void)refreshAttendanceInfoOfDriver;

/// 获取等待费用
- (void)getWaitingFareWithSendLocationManager:(SendLocationManager *)sendLocationManager;

@end

@class SendLocationModel;
@interface SendLocationManager : NSObject



@property(nonatomic , assign , readonly) BOOL timerIsWorking;

/// 初始化实例变量
+ (SendLocationManager *)shareManager;

@property(nonatomic , weak) id<SendLocationManagerDelegate>delegate;

/// 发送需要发送到服务端的信息
- (void)sendDriverLocationToServiceWithSendLoactionModel:(SendLocationModel *)model;

/// 开启定时器
- (void)startTimer;

/// 结束定时器
- (void)stopTimer;

#pragma mark - 配置信息
/// 空驶状态的模型配置,出车后需要执行这里的方法,一个订单结束后需要这里再次执行一次
- (void)configureModelInfoOfNoOrder;

/// 接到订单配置模型信息并发送自身位置信息到服务端,这里接到订单后需要执行一次这个方法
- (void)configureModelInfoOfOrdersAndSendLocationInfoWithOrderUuid:(NSString *)orderUuid;

/**
 * 空驶状态的模型配置,接到订单后,出发去接乘客
 * distanceOfTwoPoint , 最近两点之间的距离
 * totalDistance , 当前总的行驶里程
 * orderUuid , 订单uuid
 * orderStatusCode , 当前订单的状态
 * 是否需要立即向服务端发送信息
 */
- (void)configureModelInfoOfHasOrderWithTwoPointDistance:(double)distanceOfTwoPoint totalDistace:(double)totalDistance orderUuid:(NSString *)orderUuid orderStatus:(OrderStatusEnumCode)orderStatusCode isSendImmediately:(BOOL)isSendImmediately;

/// 行程中向服务端发送位置信息,订单开始需要执行一下这里的方法 , 载客状态
- (void)configureModelInfoOfOngoingOrderAndSendLocationInfoWithTwoPointDistance:(double)distanceOfTwoPoint totalDistace:(double)totalDistance orderUuid:(NSString *)orderUuid orderStatus:(OrderStatusEnumCode)orderStatusCode isSendImmediately:(BOOL)isSendImmediately;

/// 收车后发送一次司机信息到服务端,这个方法需要执行一下
- (void)configiureModelInfoOfOffWorkAndSendLocationInfo;

@end

